CC = gcc -O0
CFLAGS = -g -Wall -pthread -lrt -lm -lncurses -lpanel -lmenu
CFLAGS += -DMAX_CPU=$(shell nproc --all)

CFILES = $(wildcard *.c)
OBJ = $(patsubst %.c,%.o,$(CFILES))
PROGS = $(patsubst %.c,%.test,$(CFILES))


all: $(PROGS)

%.o: %.c
	$(CC) -c -o  $@ $< $(OBJS_HDRT) $(CFLAGS) $(METHOD)

%.test: %.o
	$(CC) -o  $@ $^ $(OBJS_HDRT) $(CFLAGS) $(METHOD)


clean:
	rm -f *.o *.test

remake: 
	make clean
	make --ignore-errors -j3
